﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

public class Row
{
    public int RowId { get; set; }
    public string Identifier { get; set; }
    private List<Seat> _seats; //ICollection<Seat> _seats;

	public Row(int rowId, string identifier)
	{
	    RowId = rowId;
	    Identifier = identifier;
	    _seats = new List<Seat>();
        //addTenSeats();
	}

    public void AddSeat(Seat seat)
    {
        _seats.Add(seat);
    }

    public void AddMultiSeats(List<Seat> seats)
    {
        _seats.AddRange(seats);// <- Hvorfor virker denne ikke ?! ?!? ?! ?! ? !?!?? !

                                //Linje 10 - ICollection<Seat> type!!! - lavet om...

        /*foreach (Seat seat in seats)
        {
            AddSeat(seat);
        }*/
    }

    public List<Seat> GetListOfSeats()
    {
        return _seats;
    } 

    /*private void addTenSeats()
    {
        int i = 1;
        while (i<11)
        {
            Seat s = new Seat(i, false);
            _seats.Add(s);
            i++;
        }
    }*/
}